<template>
  <div class="app-container home">
    <!--最上方信息栏-->
    <div>
      <el-row :gutter="20">
        <!--设备信息列-->
        <el-col :span="2">
          <el-card class="update-log">
            <div >
              <el-statistic title="总设备数">
                <template slot="formatter">
                  {{total}}
                </template>
              </el-statistic>
            </div>
          </el-card>
        </el-col>

        <el-col :span="2">
          <el-card>
            <div>
              <el-statistic title="运行设备">
                <template slot="formatter">
                  {{total}}
                </template>
              </el-statistic>
            </div>
          </el-card>
        </el-col>

      </el-row>
    </div>


    <el-divider />


    <el-row :gutter="20">
      <el-col :sm="24" :lg="12" style="padding-left: 20px">

        <p>main-app</p>
      </el-col>

      <el-col :sm="24" :lg="12" style="padding-left: 50px">
        <el-row>
          <el-col :span="12">
            <h2>技术选型</h2>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <h4>后端技术</h4>
            <ul>
              <li>SpringBoot</li>
              <li>Spring Security</li>
              <li>JWT</li>
              <li>MyBatis</li>
              <li>Druid</li>
              <li>Fastjson</li>
              <li>...</li>
            </ul>
          </el-col>
          <el-col :span="6">
            <h4>前端技术</h4>
            <ul>
              <li>Vue</li>
              <li>Vuex</li>
              <li>Element-ui</li>
              <li>Axios</li>
              <li>...</li>
            </ul>
          </el-col>
        </el-row>
      </el-col>
    </el-row>


    <el-divider />


    <el-row :gutter="20">
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">

          <div class="body">
            <p>block2</p>



          </div>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <p>block3</p>

        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <p>block4</p>
        </el-card>
      </el-col>
    </el-row>


  </div>
</template>

<script>
import {listMachine} from "@/api/machine/machine";

export default {
  name: "Index",
  data() {
    return {
      loading:true,
      total: null,
      machineList: [],
    };
  },

  created() {
    this.getList();
  },
  methods: {
    /** 查询设备概览列表 */
    getList() {
      this.loading = true;
      // this.queryParams.params = {};

      listMachine(this.queryParams).then(response => {
        this.machineList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },


    goTarget(href) {
      window.open(href, "_blank");
    },


  }
};
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>

